1. Field of the Invention
The present invention relates to a communication apparatus for transmitting frames and a priority control method for transmitting frames.
2. Description of the Related Art
In a best-effort network using a CSMA/CD system or a full duplex system, the needs for transmitting a real-time data stream of audio and video data have intensified.
However, it is difficult to reliably transmit a predetermined amount of real-time video/audio data stream (information) in its original form within a predetermined time period in the nature of the best-effort network. This situation poses a challenge of ensuring a quality of service (QoS) to an application which requires real-time transmission.
The challenge may be roughly classified into four items: guarantee of delay; guarantee of delay distribution (fluctuation); guarantee of bandwidth; and guarantee of packet loss factor. The following four techniques have been known as solutions to these challenges.
(1) Classification (Classifier)
In a router or switch, traffic is classified based on the source and destination, the TCP/UDP port number, and the ToS field of each arrived frame.
(2) Admission Control
A method for controlling the reservation of resources in each session. Resources on a path are secured by a setup protocol at start of a session, but the session is not started if the resources cannot be secured.
(3) Frame Scheduler
A method for controlling a schedule of transmitting frames which are classified into groups. Various methods may be used depending on a queuing method and a buffer management method.
(4) Traffic Shaping (Shaper)
A technique of maintaining entered burst traffic at a uniform rate.
Among these techniques, the technique of (3): frame scheduler is important in order to ensure CoS and QoS in a system having a function of outputting frames, such a terminal or a switch.
Normally, a frame scheduler creates an appropriate transmission schedule for realizing desired priority-based processing after frames have been input to a plurality of output queues. Various types of scheduling algorithms may be used, and the respective algorithms provide different operations so that one of them must be selected for a performance. Widespread examples include weighted fair queuing (WFQ) and strict priority processing.
The WFQ is the most general method among methods in which high priority is given to a high-priority queue but every low-priority queue is not eliminated. In this method, weight is assigned to each queue.
FIG. 8 shows a manner of transmitting each frame in the known art.
As shown in FIG. 8, the weight of a higher-priority queue is larger than that of a lower-priority queue. The output scheduler controls the schedule by using a round-robin algorithm for considering the indicated weight. A certain level of priority of frames can be maintained by assigning weight in proportion to a bandwidth or in units of frames.
On the other hand, in the strict priority processing scheme, the scheduler constantly extracts frames from the highest-priority queue among queues which are not empty. In the strict priority processing scheme, as the name thereof represents, the level of priority is interpreted in its literal sense. In this case, a higher-priority queue is processed prior to a lower-priority queue.
In particular, when an audio or motion-picture application, which must be transmitted in real time, is to be transmitted, the frame thereof must be processed as the highest-priority frame. In the strict priority processing scheme, in a case where frames exist both in high-priority and low-priority queues, if a frame arrives at the high-priority queue after transmission of a frame in the low-priority queue has started, the frame in the high-priority queue cannot be transmitted until the low-priority frame is completely transmitted, thus real-time transmission cannot be realized.
As a method for overcoming this disadvantage, a method for switching cells according to a predetermined time schedule has been known (e.g., see U.S. Pat. No. 6,570,873 (Japanese Patent Laid-Open No. 2000-151703)).
Also, as a method for overcoming the disadvantage, a method for fragmenting a low-priority packet and inserting the fragments between high-priority packets is known (e.g., see WO 2002/01821 A1 (Japanese Patent Laid-Open No. 2002-016637)).
However, the method for switching cells according to a predetermined time schedule described in U.S. Pat. No. 6,570,873 (Japanese Patent Laid-Open No. 2000-151703) is adaptable only to fixed-length cells, and is not applicable to variable-length frames in Ethernet or the like.
On the other hand, in the method for fragmenting a low-priority packet and inserting the fragments between high-priority packets described in WO 2002/01821 A1 (Japanese Patent Laid-Open No. 2002-016637), IP fragment must be installed, which is not suitable for a layer 2 switch or the like. Further, cyclic redundancy check (CRC) must be performed again after fragmentation. If fragmentation and re-calculation of CRC become complicated, a significant amount of time is required for the calculation, and thus processing delay may occur in a high-speed network.